package com.test39_集合应用.vo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 用户
 */
public class User implements Serializable {
    private String uid;
    private String name;
    private List<Role> roles;

    public User() {
        this.roles = new ArrayList<>();
    }

    public User(String uid, String name) {
        this.uid = uid;
        this.name = name;
        this.roles = new ArrayList<>();
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<Role> getRoles() {
        return roles;
    }

    public void setRoles(List<Role> roles) {
        this.roles = roles;
    }

    @Override
    public String toString() {
        return "【用户】ID = " + this.uid + "、姓名 = " + this.name;
    }
}
